/**
* @author:kellen
* @contact:xiekellen@hotmail.com
* @company:achivo-gz
* @created on:
* @modified on:
*/

package com.sasis.service.impl;

import java.util.List;

import com.sasis.service.impl.BaseManager;
import com.sasis.model.Flight;
import com.sasis.dao.FlightDao;
import com.sasis.service.FlightManager;

import com.sasis.util.PageList;
import com.sasis.util.PageRequest;

public class FlightManagerImpl extends BaseManager implements FlightManager {
    private FlightDao dao;

    /**
     * Set the Dao for communication with the data layer.
     * @param dao
     */
    public void setFlightDao(FlightDao dao) {
        this.dao = dao;
    }

    /**
     * @see com.sasis.service.FlightManager#getFlights(com.sasis.model.Flight)
     */
    public List getFlights(final Flight flight) {
        return dao.getFlights(flight);
    }

    /**
     * @see com.sasis.service.FlightManager#getFlight(String id)
     */
    public Flight getFlight(final String id) {
        return dao.getFlight(new Integer(id));
    }
    
    public Flight getFlight(final Flight flight) {
        return dao.getFlight(flight);
    }

    /**
     * @see com.sasis.service.FlightManager#saveFlight(Flight flight)
     */
    public void saveFlight(Flight flight) {
        dao.saveFlight(flight);
    }

    /**
     * @see com.sasis.service.FlightManager#removeFlight(String id)
     */
    public void removeFlight(Flight flight) {
        dao.removeFlight( flight);
    }
    public PageList queryForPageList(String listStatementId,  
    		Object parameterObject, PageRequest pageRequest){
	return dao.queryForPageList(listStatementId,   parameterObject, pageRequest);
    }
}
